<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>付款申请单</title>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>
<body class="iframeBody">
<div class="Wrapper">
        <form id="capPayInfo_form">
            <div class="fieldset1 tabel_col clearFix">
                <div class="caption">
                    <span class="title">基本信息</span>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">首付款代收</div>
                    <div class="field">
                    	<%-- <c:if test="${capPayInfoVO.isFstCol==1}"><span class="requiredSymbol">是</span></c:if>
            			<c:if test="${capPayInfoVO.isFstCol==0}"><span class="requiredSymbol">否</span></c:if> --%>
            			<input type="checkbox" name="isFstCol" id="isFstCol"
                               <c:if test="${capPayInfoVO.isFstCol==1}">checked</c:if>>
                               <span class="requiredSymbol">是</span>
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">首付金额(元)</div>
                    <div class="field">
                        <span id="initPayAmt" class="requiredSymbol"></span>
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">首付不含咨询费(元)</div>
                    <div class="field">
                        <span id="initFstShowAmt" class="requiredSymbol"></span>
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">设备款(元)</div>
                    <div class="field">
                        <span id="prdAmt" class="requiredSymbol"></span>
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">所属事业部</div>
                    <div class="field">
                        <span>${capPayInfoVO.buOrgCdNm}</span>
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">项目类型</div>
                    <div class="field">
                        <span>${capPayInfoVO.prjTypCdNm}</span>
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">客户名称</div>
                    <div class="field">
	                    <a href="javascript:showCstDtl(${capPayInfoVO.cstId})" class="link">
                        	<span>${capPayInfoVO.cstNm}</span>
                        </a>
                    </div>
                </div>
                <div class="fieldBox col_33">
		            <div class="label">代扣卡验证状态</div>
		            <div class="field">
		                <span class="requiredSymbol">${audStsCdNm}</span>
		            </div>
		        </div>
                <div class="fieldBox col_33">
                    <div class="label">融资租赁合同号</div>
                    <div class="field">
	                    <a href="javascript:toPrjDetail(${capPayInfoVO.prjId })" class="link">
	                        <span>${capPayInfoVO.contNo}</span>
                        </a>
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label">支付表号</div>
                    <div class="field">
	                    <a href="javascript:showPrjPrdPaySchDtl()" class="link">
                        	<span>${capPayInfoVO.paySchNo}</span>
                        </a>
                    </div>
                </div>
                <div class="fieldBox col_33">
                    <div class="label"><span class="requiredSymbol">上牌信息</span></div>
                    <div class="field">
                    	<c:if test="${spState==1 }">
                        	<span class="requiredSymbol">已上牌</span>
                    	</c:if>
                    	<c:if test="${spState==0 }">
                        	<span class="requiredSymbol">未上牌</span>
                    	</c:if>
                    	<c:if test="${spState==0 && spFlag==1 && isExistSp==1 }">
		                    <a href="javascript:modifySp(${capPayInfoVO.prjPrdDtlId})" class="link">
	                        	<span>修改上牌信息</span>
	                        </a>
                    	</c:if>
                    	<c:if test="${spState==0 && spFlag==1 && isExistSp==0 }">
		                    <a href="javascript:addSp(${capPayInfoVO.prjPrdDtlId})" class="link">
	                        	<span>添加上牌信息</span>
	                        </a>
                    	</c:if>
                    	<c:if test="${spFlag==0 && isExistSp==1 }">
		                    <a href="javascript:showSp(${capPayInfoVO.prjPrdDtlId})" class="link">
	                        	<span>查看上牌信息</span>
	                        </a>
                    	</c:if>
                    </div>
                </div>
                <c:if test="${escFlag==1 }">
	                <div class="fieldBox col_33">
	                    <div class="label"><span class="requiredSymbol">抵押信息</span></div>
	                    <div class="field">
	                    	<c:if test="${dyState==1 }">
	                        	<span class="requiredSymbol">已抵押</span>
	                    	</c:if>
                            <c:if test="${dyState==2 }">
                                <span class="requiredSymbol">无法抵押</span>
                            </c:if>
	                    	<c:if test="${dyState==0 }">
	                        	<span class="requiredSymbol">未抵押</span>
	                    	</c:if>
	                    	<c:if test="${dyState==0 && dyFlag==1 && isExistDy==1 }">
			                    <a href="javascript:modifyDy(${capPayInfoVO.prjPrdDtlId})" class="link">
		                        	<span >修改抵押信息</span>
		                        </a>
	                    	</c:if>
	                    	<c:if test="${dyState==0 && dyFlag==1 && isExistDy==0 }">
			                    <a href="javascript:addDy(${capPayInfoVO.prjPrdDtlId})" class="link">
		                        	<span >添加抵押信息</span>
		                        </a>
	                    	</c:if>
	                    	<c:if test="${dyFlag==0 && isExistDy==1 }">
			                    <a href="javascript:showDy(${capPayInfoVO.prjPrdDtlId})" class="link">
		                        	<span >查看抵押信息</span>
		                        </a>
	                    	</c:if>
	                    </div>
	                </div>
                </c:if>
	            <div class="fieldBox col_100">
		            <div class="label">是否团单</div>
		            <div class="field">
		            	<select name="isGrp" id="isGrp" data-value=" ">
		                	<option value=" " selected="selected">请选择</option>
		                	<c:forEach items="${yesOrNOList }" var="kv">
								<option value="${kv.key }">${kv.value }</option>
							</c:forEach>
						</select>
		            </div>
		        </div>
		    	<c:if test="${hjzxFlag==1}">
			    	<div class="fieldset1 clearFix">
				        <div class="btnsBox" style="text-align: center;">
					        	<span id="saveIsGrp_Btn" class="sq-button sq-button-round" onclick="saveIsGrp_Btn();">保存</span>
					    </div>
				    </div>
		    	</c:if>
                <c:if test="${capPayInfoVO.buOrgCd == '00000001' || capPayInfoVO.buOrgCd == '00000008'}">
                    <div class="fieldBox col_100">
                        <div class="label">风控决策系统（CDS）结果</div>
                        <div class="field">
						<span name="auditInfo" id="auditInfo">
                                ${auditInfo }
                        </span>
                        </div>
                    </div>
                </c:if>
                <div class="fieldBox col_100">
                    <div class="label">客户风险标记</div>
                    <div class="field">
						<span name="rskCstSignDesc" id="rskCstSignDesc"  style="color: red">
                            ${rskCstSignDesc}
                        </span>
                    </div>
                </div>
                <div class="fieldBox col_100">
                    <div class="label">担保人风险标记</div>
                    <div class="field">
						<span name="rskGuarSignDesc" id="rskGuarSignDesc"  style="color: red">
                            ${rskGuarSignDesc}
                        </span>
                    </div>
                </div>
                <div class="fieldBox col_100">
                    <div class="label">设备风险标记</div>
                    <div class="field">
						<span name="rskProdSignDesc" id="rskProdSignDesc"  style="color: red">
                            ${rskProdSignDesc}
                        </span>
                    </div>
                </div>
                <div class="fieldBox col_100">
                    <div class="label">Vin风险标记</div>
                    <div class="field">
                        <span name="rskVinSignDesc" id="rskVinSignDesc"  style="color: red">
                            ${rskVinSignDesc}
                        </span>
                    </div>
                </div>
                <div class="fieldBox col_100">
                    <div class="label">挂靠公司风险标记</div>
                    <div class="field">
                        <span name="rskLnkSignDesc" id="rskLnkSignDesc"  style="color: red">
                            ${rskLnkSignDesc}
                        </span>
                    </div>
                </div>
                <div class="fieldBox col_100">
                    <div class="label">供应商风险标记</div>
                    <div class="field">
                        <span name="rskSplSignDesc" id="rskSplSignDesc"  style="color: red">
                            ${rskSplSignDesc}
                        </span>
                    </div>
                </div>
                <div class="fieldBox col_100">
                    <div class="label">手机号风险标记</div>
                    <div class="field">
                        <span name="rskCstMpSignDesc" id="rskCstMpSignDesc"  style="color: red">
                            ${rskCstMpSignDesc}
                        </span>
                    </div>
                </div>
                <c:if test="${isAuditNode==1}">
                    <c:if test="${splRiskWarnCd==1}">
                        <div class="fieldBox col_33">
                            <div class="label">供应商预警状态</div>
                            <div class="field">
                                <span style='color:red'>高风险预警</span>
                            </div>
                        </div>
                    </c:if>
                    <c:if test="${lnkRiskWarnCd==1}">
                        <div class="fieldBox col_33">
                            <div class="label">挂靠公司预警状态</div>
                            <div class="field">
                                <span style='color:red'>高风险预警</span>
                            </div>
                        </div>
                    </c:if>
                </c:if>
			</div>
            <div>
                <div id="pageInTab" class="pageInTab">
                    <div tabid="payTab" title="付款通知" lselected="true">
                        <div class="fieldset1 tabel_col clearFix">
                            <div class="caption">
                                <span class="title">收款方信息</span>
                            </div>
                            <div class="fieldBox col_33">
                                <div class="label">收款方类型</div>
                                <div class="field">
                                    <input name="payeeTypCd" id="payeeTypCd"
                                           data-value="${capPayeeInfoVO.payeeTypCd}"
                                           validate="{required:true}" placeholder="请选择" ltype="combobox" >
                                    <span class="requiredSymbol">*</span>
                                </div>
                            </div>
                            <div class="fieldBox col_66">
                                <div class="label">收款单位</div>
                                <div class="field">
                                    <input name="rcptUnt" id="rcptUnt" data-value="${capPayeeInfoVO.rcptUnt}"
                                           validate="{required:true}" type="text" class="ui-textbox">
                                    <span class="requiredSymbol">*</span>
                                </div>
                            </div>
                            <div class="fieldBox col_33">
                                <div class="label">账户类型</div>
                                <div class="field">
                                    <input name="bkAccTypCd" id="bkAccTypCd"
                                           data-value="${capPayeeInfoVO.bkAccTypCd}"
                                           validate="{required:true}" placeholder="请选择" ltype="combobox">
                                    <span class="requiredSymbol">*</span>
                                </div>
                            </div>
                            <div class="fieldBox col_66">
                                <div class="label">开户行</div>
                                <div class="field">
                                    <input name="payeeBkNm" id="payeeBkNm" data-value="${capPayeeInfoVO.payeeBkNm}"
                                           validate="" type="text" class="ui-textbox">
                                    <span class="requiredSymbol">*</span>
                                </div>
                            </div>
                            <div class="fieldBox col_33">
                                <div class="label">开户行号</div>
                                <div class="field">
                                    <input name="payeeBkNo" id="payeeBkNo" data-value="${capPayeeInfoVO.payeeBkNo}"
                                           validate="{number:true}" type="text" class="ui-textbox">
                                    <span class="requiredSymbol">*</span>
                                </div>
                            </div>
                            <div class="fieldBox col_66">
                                <div class="label">收款账号</div>
                                <div class="field">
                                    <input name="accNo" id="accNo" data-value="${capPayeeInfoVO.accNo}"
                                           validate="{required:true,number:true}" type="text" class="ui-textbox">
                                    <span class="requiredSymbol">*</span>
                                </div>
                                <input name="payeeId" id="payeeId" type="text" style="display: none;" value="${capPayeeInfoVO.id}">
                                <input name="bkId" id="bkId" type="text" style="display: none;" value="${capPayeeInfoVO.bkId}">
                            </div>
                            <div class="fieldBox col_100">
                                <div class="label">付款备注</div>
                                <div class="field">
                                      <textarea name="payRem" id="payRem" class="ui-textarea l-textarea"
                                                value="${capPayInfoVO.payRem}"
                                                rows="2" cols="120" style="width: 97%;"
                                                validate="{maxlength:200}">${capPayInfoVO.payRem}</textarea>
                                </div>
                            </div>
                        </div>

                        <div class="fieldset1 tabel_col clearFix">
                            <div class="caption">
                                <span class="title">付款信息</span>
                            </div>
                            <input type="text" style="display: none;" id="paySchId" name="paySchId"
                                   value="${capPayInfoVO.paySchId}">
                            <div class="fieldBox col_33">
	                            <div class="label">应付款金额(元)</div>
	                            <div class="field">
	                                <input name="payAmt" id="payAmt" type="text" data-tofix="2" class="ui-textbox" validate="{number:true}">
	                                <span class="requiredSymbol">*</span>
	                            </div>
	                        </div>
                            <%--<div class="fieldBox col_66">
                                <div class="label">付款用途</div>
                                <div class="field">
                                    <input name="fundUse" id="fundUse" type="text" class="ui-textbox"
                                           value="${capPayInfoVO.fundUse}" validate="">
                                </div>
                            </div>--%>
                            <div class="fieldBox col_66_auto">
                                <div class="label">付款方式</div>
                                <div class="field">
                                    <input name="payWayCd" id="payWayCd" data-value="${capPayeeInfoVO.payWayCd}"
                                           validate="" placeholder="请选择" ltype="combobox" <c:if test="${isAllowMdfPayTypCd==0 }">disabled</c:if>>
                                           <c:if test="${isAllowMdfPayTypCd==0 }"><span class="requiredSymbol">*付款单信息已发送网银</span></c:if>
                                </div>
                            </div>
                            <div class="fieldBox col_33">
                                <div class="label">实付金额(元)</div>
                                <div class="field">
                                    <input name="actPayAmt" id="actPayAmt" type="text" class="ui-textbox" data-tofix="2" validate="{number:true}">
                                </div>
                            </div>
                            <div class="fieldBox col_66_auto">
                                <div class="label">实付时间</div>
                                <div class="field">
                                    <input name="actPayTm" id="actPayTm" type="text" class="ui-datepicker"
                                           value="" validate="">
                                </div>
                            </div>
                        </div>
                        <%-- <div class="fieldset1 clearFix" id="sendPayDIV" style="display:none;">
                            <div class="btnsBox" id="sendPayDIV" style="display:none;">
					        	<span id="sendPayBtn" class="sq-button sq-button-round" onclick="toSendPay(${capPayeeInfoVO.id});">网银付款调资金系统发起付款</span>
						    </div>
					    </div>
				    	<c:if test="${kjshFlag==1 || btnFlag==1}"> --%>
	                        <div class="fieldset1 clearFix">
	                            <div class="btnsBox">
	                            	<c:if test="${kjshFlag==1 || confirmPay==1}">
						        	<span id="savePayAmt_Btn" class="sq-button sq-button-round" onclick="savePayAmt_Btn();">修改应付金额</span>
						        	</c:if>
						        	<c:if test="${btnFlag==1}">
						        		<span id="savePayeeInfo_Btn" class="sq-button sq-button-round" onclick="savePayeeInfo_Btn();">保存</span>
						        	</c:if>
	                            	<c:if test="${confirmPay==1}">
						        	<span id="savePayAmt_Btn" class="sq-button sq-button-round" onclick="cancelPay(${capPayId});">取消放款</span>
										<span style="color: red;">  取消后无法恢复!</span>
						        	</c:if>
						        	<!-- <div id="sendPayDIV" style="display:none;"> -->
						        	<c:if test="${isAllowMdfPayTypCd!=0 }">
							        	<span id="sendPayDIV" style="display:none;" class="sq-button sq-button-round" onclick="toSendPay(${capPayeeInfoVO.id});">保存并发送付款单到资金系统</span>
						        	</c:if>
								    <!-- </div> -->
							    </div>
						    </div>
				    	<%-- </c:if> --%>
                    </div>
                    <div tabid="leaseTab" title="租赁物信息(${capPayInfoVO.prdCount})">
                        <iframe frameborder="0" id="lease" name="lease" src=""></iframe>
                    </div>
                    <div tabid="hisTab" title="历史付款记录(${capPayInfoVO.payCount})">
                        <iframe frameborder="0" id="hispay" name="hispay" src=""></iframe>
                    </div>
                    <div tabid="mateTab" title="放款资料(${capPayInfoVO.fileCount})">
                        <iframe frameborder="0" id="material" name="material" src=""></iframe>
                    </div>
                    <div tabid="insTab" title="查看保单">
                        <iframe frameborder="0" id="insDtl" name="insDtl" src=""></iframe>
                    </div>
                    <c:if test="${QZTX==1}">
                    	<div tabid="startRentTab" title="起租提醒">
                        	<iframe frameborder="0" id="startRent" name="startRent" src=""></iframe>
                    	</div>
                    </c:if>
                </div>
            </div>
            <div class="btnsBox">
		    	<c:if test="${hjzxFlag==1}">
		        	<span id="contractOpn" class="sq-button sq-button-round" onclick="contractOpnStart();">放款合同通过意见</span>
		    	</c:if>
		    	<c:if test="${xsFlag==1}">
		        	<span id="mortGageOpn" class="sq-button sq-button-round" onclick="mortGageOpnStart();">放款抵押通过意见</span>
		    	</c:if>
		    	<c:if test="${hjzxFlag==1 || xsFlag==1 || bhFlag==1}">
		        	<span id="rejOpn" class="sq-button sq-button-round" onclick="rejOpnStart();">驳回意见</span>
		    	</c:if>
		        <input type="reset" id="resetBtn" class="l-button l-button-reset Hide">
		    </div>
		    <input name="cstId" id="cstId" type="text" style="display: none;" value="${capPayInfoVO.cstId}">
            <input name="splId" id="splId" type="text" style="display: none;" value="${capPayInfoVO.splId}">
            <%--设置浙银金租的时候的显示setLeaseData==1--%>
            <c:if test="${setLeaseData==1}">
                <div class="fieldBox col_50">
                    <div class="label">设置起租日</div>
                    <div class="field">
                        <input type="text" id="leaseDate" name="leaseDate" class="ui-datepicker" value="${leaseDate}" validate=""/>
                        <span id="addDueDt_Btn" class="sq-button sq-button-round" onclick="addLeaseDate();">保存起租日</span>
                    </div>
                </div>
            </c:if>
        </form>
</div>

<script>
var _capPayId = '${capPayId}';//付款信息ID
var _proIntId = '${proIntId}';//流程实例ID
var _taskId = '${taskId}';//任务节点ID
var _taskDefKey = '${taskDefKey}';//任务节点KEY
var _taskNm = '${taskNm}';//任务节点名称
var _isAuditNode = '${isAuditNode}';//是否信审节点标识

    var pageInTab = null;
    var pageInApp = {};
    var loadedTabs = [];
    
    var payeeTypCdList=[];
    <c:if test="${not empty payeeTypCdList}">
    	payeeTypCdList = ${payeeTypCdList};//收款方类型
	</c:if>
    var bkAccTypCdList=[];
    <c:if test="${not empty bkAccTypCdList}">
    	bkAccTypCdList = ${bkAccTypCdList};//收款账号类型
	</c:if>
    var payWayCdList=[];
    <c:if test="${not empty payWayCdList}">
    	payWayCdList = ${payWayCdList};//付款方式类型
	</c:if>
    	
    $(function () {
    	var actPayTm = '${capPayeeInfoVO.actPayTm}';
    	if(StringUtils.isNotEmpty(actPayTm)){
    		var date = new Date(actPayTm);
    		var dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DD);
    		$("#actPayTm").val(dateStr);
    	}
        //var capPayInfoId = "${capPayInfoVO.id}";//主键ID
        var prdAmt = parseInt('${capPayInfoVO.prdAmt}');//设备款
        $("#prdAmt").text(FormatMoney(prdAmt / 100));
        var initamt = parseInt('${capPayInfoVO.initPayAmt}');//首期款
        $("#initPayAmt").text(FormatMoney(initamt / 100));
        
        //应付款金额
        var payAmt='${capPayInfoVO.payAmt}';
        if(payAmt){
            $("#payAmt").val(parseInt('${capPayInfoVO.payAmt}')/100);
        }
        
        var minusamt = parseInt('${capPayInfoVO.minusAmt}');//首期款不含咨询费
        $("#initFstShowAmt").text(FormatMoney((initamt-minusamt)/100));
        
        var actPayAmt='${capPayeeInfoVO.actPayAmt}';
        if(actPayAmt){
            $("#actPayAmt").val(parseInt('${capPayeeInfoVO.actPayAmt}')/100);
        }

        $('#isFstCol').ligerCheckBox();
        $("#payeeTypCd").ligerComboBox({
            valueField: 'key',
            textField: 'value',
            data:payeeTypCdList
        });
        $("#bkAccTypCd").ligerComboBox({
            valueField: 'key',
            textField: 'value',
            data:bkAccTypCdList
        });
        $("#payWayCd").ligerComboBox({
            valueField: 'key',
            textField: 'value',
            data:payWayCdList
        });

        $("#capPayInfo_form").ligerForm({
            validate: true
        });
        
        /*是否代收首期款*/
        $("#isFstCol").change(function () {
            if (this.checked) {
            	var money = prdAmt - initamt;//应付款=设备款-首期款
                $("#payAmt").val(parseInt(money)/100);
            } else {
            	var money = prdAmt;//应付款=设备款
                $("#payAmt").val(parseInt(money)/100);
            }
        });
        
        //禁用所有
        disabledAll();
      	//节点处理-解除禁用
        var form = liger.get("capPayInfo_form");
        form.setData({
        	isGrp:'${capPayInfoVO.isGrp}',
        });
        var hjzxFlag = '${hjzxFlag}';//呼叫中心
        if(hjzxFlag==1){
        	liger.get("isGrp").setEnabled();
        }
        var kjshFlag = '${kjshFlag}';//会计审核
        if(kjshFlag==1){
        	liger.get("payAmt").setEnabled();
        	$("#isFstCol").removeAttr("disabled");
        }
        var confirmPay = '${confirmPay}';//付款审核
        if(confirmPay==1){
        	liger.get("payAmt").setEnabled();
        	$("#isFstCol").removeAttr("disabled");
        }
        var zjlFlag = '${zjlFlag}';//呈报人
        if(zjlFlag==1){
        	enable1();
        }
        var zjbFlag = '${zjbFlag}';//资金部
        if(zjbFlag==1){
        	if(liger.get("payWayCd")){
        		liger.get("payWayCd").setEnabled();
        	}
	        /* var _payWayCd = '${capPayeeInfoVO.payWayCd}';
	        if(_payWayCd==3){
	        	$("#sendPayDIV").show();
	        }else{
	        	$("#sendPayDIV").hide();
	        } */
        }
      	//出纳节点并且付款方式不为网银
        var cnFlag = '${cnFlag}';//出纳
        var payWayCd_= '${capPayeeInfoVO.payWayCd}';
        if(cnFlag==1 && payWayCd_ != 3){
        	if(liger.get("actPayAmt")){
    	    	liger.get("actPayAmt").setEnabled();
        	}
        	if(liger.get("actPayTm")){
    	    	liger.get("actPayTm").setEnabled();
        	}
        }else if(cnFlag==1 && payWayCd_ == 3){
        	//出纳节点&&网银付款 --> 屏蔽保存按钮
        	$("#savePayeeInfo_Btn").hide();
        	
        }
        //城配流程-财务付款 标识  - 维护付款方式/实付时间/实付金额  如果是网银付款 显示调资金系统发送付款信息按钮
        var isCPCW = '${isCPCW}';
        if(isCPCW==1){
        	$("#isFstCol").removeAttr("disabled");//可以修改是否首期款代收
        	if(liger.get("payWayCd")){
        		liger.get("payWayCd").setEnabled();
        	}
	        var _payWayCd = '${capPayeeInfoVO.payWayCd}';
	        if(_payWayCd==3){
	        	$("#savePayeeInfo_Btn").hide();
	        	$("#sendPayDIV").show();
	        	if(liger.get("actPayAmt")){
	    	    	liger.get("actPayAmt").setDisabled();
	        	}
	        	if(liger.get("actPayTm")){
	    	    	liger.get("actPayTm").setDisabled();
	        	}
	        }else{
	        	$("#savePayeeInfo_Btn").show();
	        	$("#sendPayDIV").hide();
	        	if(liger.get("actPayAmt")){
	    	    	liger.get("actPayAmt").setEnabled();
	        	}
	        	if(liger.get("actPayTm")){
	    	    	liger.get("actPayTm").setEnabled();
	        	}
	        }
	        //绑定付款方式change事件
	        $("#payWayCd").change(function () {
	            var payWayCd = liger.get("payWayCd").getValue();
	            if(payWayCd==3){
	            	$("#savePayeeInfo_Btn").hide();
	            	$("#sendPayDIV").show();
		        	if(liger.get("actPayAmt")){
		    	    	liger.get("actPayAmt").setDisabled();
		        	}
		        	if(liger.get("actPayTm")){
		    	    	liger.get("actPayTm").setDisabled();
		        	}
	            }else{
	            	$("#savePayeeInfo_Btn").show();
	            	$("#sendPayDIV").hide();
		        	if(liger.get("actPayAmt")){
		    	    	liger.get("actPayAmt").setEnabled();
		        	}
		        	if(liger.get("actPayTm")){
		    	    	liger.get("actPayTm").setEnabled();
		        	}
	            }
	        });
        }else{
        	$("#savePayeeInfo_Btn").show();
        	$("#sendPayDIV").hide();
        }
        
        //by YAOXIURONG 17-9-7 
        var addReturnInfo = '${addReturnInfo}';
        if(addReturnInfo==1){
        	if(liger.get("actPayAmt")){
    	    	liger.get("actPayAmt").setEnabled();
        	}
        	if(liger.get("actPayTm")){
    	    	liger.get("actPayTm").setEnabled();
        	}
        }
        
        
        pageInTab = $("#pageInTab").ligerTab({
            height: 'auto',
            contextmenu: false,
            minIframeHeight: GET_minIframeHeight(),
            onAfterSelectTabItem: function (tabid) {
                if (loadedTabs.indexOf(tabid) < 0) {
                    loadedTabs.push(tabid);
                    if (tabid != "payTab") {
                        switch (tabid) {
                            case "leaseTab":
                            	//pageInTab.setTabItemSrc(tabid, "<%=path%>/capital/capPayInfo/toLeaseListPage.do?paySchId=${capPayInfoVO.paySchId}");
                                pageInTab.setTabItemSrc(tabid, "<%=path%>/project/prjprdvehinfo/toCompPrdInfoListPage.do?dtlId=${capPayInfoVO.prjPrdDtlId}&isAuditNode="+_isAuditNode);
                                break;
                            case "hisTab":
                                pageInTab.setTabItemSrc(tabid, "<%=path%>/capital/capPayInfo/toHisPayListPage.do?id=${capPayInfoVO.id}&paySchId=${capPayInfoVO.paySchId}");
                                break;
                            case "mateTab":
                                pageInTab.setTabItemSrc(tabid, "<%=path%>/capital/capPayInfo/toMateListPage.do?ctrlKey=${ctrlKey}&id=${capPayInfoVO.id}&payStsCd=${capPayInfoVO.payStsCd}&prjPrdDtlId=${capPayInfoVO.prjPrdDtlId}&cstId=${capPayInfoVO.cstId}&prjId=${capPayInfoVO.prjId}&cstMgrOrgCd=${capPayInfoVO.cstMgrOrgCd}&prjTypCd=${capPayInfoVO.prjTypCd}&paySchNo=${capPayInfoVO.paySchNo}");
                                break;
                            case "insTab":
                                var operateInsPlc = '${operateInsPlc}';
                            	if(operateInsPlc==1){
	                                pageInTab.setTabItemSrc(tabid, "<%=path%>/insurance/insPlcBscInfo/toPlcPage.do?paySchId=${capPayInfoVO.paySchId}&operateInsPlc=${operateInsPlc}");
   			                   	}else{
                                	pageInTab.setTabItemSrc(tabid, "<%=path%>/insurance/insPlcBscInfo/toPlcListPage.do?paySchId=${capPayInfoVO.paySchId}");
   			                   	}
                                break;
                            case "startRentTab":
                            	pageInTab.setTabItemSrc(tabid, "<%=path%>/risk/rskCommRec/toStartRentPage.do?cstId=${capPayInfoVO.cstId}&paySchId=${capPayInfoVO.paySchId}");
                                break;
                        }
                    }
                }
                SetIframe_height();
            }
        });

        $.extend(true, pageInApp, {
            pageInTab: pageInTab
        });

        $("#pageloading").hide();

        $("#payeeTypCd").change(function () {
            var payeeTypCd = liger.get("payeeTypCd").getValue();
            $("#rcptUnt").val("");
            $("#bkAccTypCd").val("");
            $("#payeeBkNm").val("");
            $("#payeeBkNo").val("");
            $("#accNo").val("");
            if(payeeTypCd==3){
                $("#bkAccTypCd").removeAttr("readonly");
                $("#payeeBkNm").removeAttr("readonly");
                $("#payeeBkNo").removeAttr("readonly");
                $("#accNo").removeAttr("readonly");
            }else{
                $("#bkAccTypCd").attr("readonly","readonly");
                $("#payeeBkNm").attr("readonly","readonly");
                $("#payeeBkNo").attr("readonly","readonly");
                $("#accNo").attr("readonly","readonly");
            }
        });

        //选择
        $("#rcptUnt").click(function (event) {
            var payeeTypCd = liger.get("payeeTypCd").getValue();
            if (!payeeTypCd) {
                $.ligerDialog.SQalert({content: "请先选择收款方类型", SQ_type: "warning"});
                return;
            }
            if(payeeTypCd==3){
                return;
            }
            var cstId = $("#cstId").val();//客户ID
            var splId = $("#splId").val();//供应商ID
            var onOk = function (item, Dialog) {
                if (Dialog.onOk) Dialog.onOk();
            };
            var onCancel = function (item, Dialog) {
                if (Dialog.onCancel) Dialog.onCancel();
            };
            $.ligerDialog.SQopen({
                width: 850,
                height: 350,
                title: '收款账户列表',
                url:'<%=path%>/capital/capPayeeInfo/toChoosePayee.do',
                buttons: [
                    {
                        text: "确定", onclick: onOk, type: 'ok', cls: 'l-dialog-btn-ok'
                    }, {
                        text: "关闭", onclick: onCancel, type: 'cancel', cls: 'l-dialog-btn-no'
                    }
                ],
                data:{payeeTypCd:payeeTypCd,cstId:cstId,splId:splId}
            });
        });

        SET_popupIframeHeight();
    });

    //获取收款方
    function getRcptUntList(payeeTypCd, splId, cstId) {
        if (!payeeTypCd) {
            $.ligerDialog.SQalert({content: "请先选择收款方类型", SQ_type: "warning"});
            return;
        }
        var wait_dialog;
        $.ajax({
            type: 'get',
            dataType: 'json',
            async: false,
            url: '<%=path%>/capital/capPayeeInfo/getPayeeList.do?payeeTypCd=' + payeeTypCd + "&splId=" + splId + "&cstId=" + cstId,
            beforeSend: function () {
                wait_dialog = $.ligerDialog.SQalert({
                    content: LogUtils.LOG_CMM_DATA_LOADING,
                    SQ_type: "waitting"
                });
            },
            success: function (msg) {
                wait_dialog.close();
                if (msg.success == 1) {
                    rcptUntList = JSON.parse(msg.data);
                } else {
                    rcptUntList = [];
                }
            }
        });
    }

    function getBkDtl(bkId, payeeTypCd) {
        if (payeeTypCd == 1) {
            $.ligerDialog.open({
                cls: 'noBorder_Dialog',
                width: 1000,
                height: 400,
                title: '供应商银行账户信息',
                url: '<%=path%>/product/splBank/toDetail.do?id=' + bkId
            });
        } else {
            //TODO yjc 客户银行账号信息
            $.ligerDialog.open({
                cls: 'noBorder_Dialog',
                width: 550,
                height: 500,
                title: '承租人银行账户信息',
                //url:'<%=path%>/capital/capPayInfo/toModifyPage.do?id='+bkId
            });
        }
    }
    //保存是否团单
    function saveIsGrp_Btn(){
    	var _isGrp = $("#isGrp").val();
    	if(!_isGrp || _isGrp==" "){
    		top.$.ligerDialog.SQalert({content: "是否团单不能为空.", SQ_type: "warning"});
    		return;
    	}
    	var wait_dialog;
    	$.ajax({
    		type: 'post',
    		dataType:'json',
    		data:{
    			capPayId:_capPayId,
    			isGrp:_isGrp
    		},
    		url: '<%=path%>/capPay/flow/modifyIsGrp.do',
    		beforeSend: function(){
		          wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
		     },
    		success:function(msg){
    			 wait_dialog.close();
    			 if(msg.success == 1){
    				 top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "success"});
    			 }else{
    				 top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
    			 }
    		}
    	});
    }
    //保存会计核算付款金额
    function savePayAmt_Btn(){
    	var _payAmt = $("#payAmt").val();
    	if(!_payAmt || _payAmt==""){
    		$.ligerDialog.SQalert({content: "应付款金额不能为空.", SQ_type: "warning"});
    		return;
    	}
    	var data = new Object();
    	data["payAmt"]= _payAmt;
    	data["capPayId"]= _capPayId;
    	data["isFstCol"]= liger.get("isFstCol").getValue();
    	var wait_dialog;
    	$.ajax({
    		type: 'post',
    		dataType:'json',
    		data:data,
    		url: '<%=path%>/capPay/flow/modifyPayAmt.do',
    		beforeSend: function(){
		          wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
		     },
    		success:function(msg){
    			 wait_dialog.close();
    			 if(msg.success == 1){
    				 top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "success"});
    				 var isNeedCallback = '${isNeedCallback}';
                     if(isNeedCallback==1){
 	                  	//回调刷新列表
 						 var callback=GET_W2Wcallback();
 			             callback();
                     }
    			 }else{
    				 top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
    			 }
    		}
    	});
    }
    //保存收款方信息
	function savePayeeInfo_Btn(){
		var form = liger.get("capPayInfo_form");
        var data = form.getData();
        data["payeeId"]=$("#payeeId").val();
        var _url='<%=path%>/capPay/flow/modifyCapPayeeInfo.do?id=' + _capPayId
        var wait_dialog;
        $.ajax({
            type: 'post',
            dataType: 'json',
            data: data,
            url: _url,
            beforeSend: function () {
                wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
            },
            success: function (msg) {
                wait_dialog.close();
                if (msg.success == 1) {
                    top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
                    var _payWayCd = data["payWayCd"];
                    var isNeedCallback = '${isNeedCallback}';
                    if(isNeedCallback==1){
	                  	//回调刷新列表
						 var callback=GET_W2Wcallback();
			             callback();
                    }
                } else {
                    $.ligerDialog.SQalert({content: msg.info, SQ_type: "error"});
                }
            }
        });
    }
    
    //取消放款
	function cancelPay(_capPayId){
		if(!_capPayId)return;
		
		$.ligerDialog.confirm("<span style='color: red;'>确定取消此支付表的放款吗?取消后无法恢复!</span>", function (flag) {
			if(flag == false)return;
			var wait_dialog;
			$.ajax({
				type: 'post',
				dataType:'json',
				data:{capPayId:_capPayId,processInstanceId:_proIntId},
				url: '<%=path%>/capPay/flow/cancelPay.do',
				beforeSend: function(){
				     wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING,SQ_type:"waitting"});
				},
				success:function(msg){
					wait_dialog.close();
					 if(msg.success == 1){
						 UIUtils.alertSuccess(msg.info);
						 //回调刷新列表
						 var callback=GET_W2Wcallback();
			             callback();
			             //关闭当前页
						 var TAB=top.mainApp.parentTab;
						 var currentTabid=TAB.getSelectedTabItemID();
			             top.tab.removeTabItem(currentTabid);
					 }else{
						 UIUtils.alertError(msg.info);
					 }
				}
			});
		});
	}
    
    //调资金系统发起付款
	function toSendPay(_payeeId){
		var form = liger.get("capPayInfo_form");
        var data = form.getData();
        data["payeeId"]=$("#payeeId").val();
        var _url='<%=path%>/capPay/flow/modifyCapPayeeInfo.do?id=' + _capPayId ;
        var wait_dialog;
        $.ajax({
            type: 'post',
            dataType: 'json',
            data: data,
            url: _url,
            beforeSend: function () {
                wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
            },
            success: function (msg) {
                if (msg.success == 1) {
                    //top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
                    var _payWayCd = data["payWayCd"];
                    var isNeedCallback = '${isNeedCallback}';
                    if(isNeedCallback==1){
	                  	//回调刷新列表
						 var callback=GET_W2Wcallback();
			             callback();
                    }
                    //调拜特
                    if(!_payeeId){
                		return;
                	}
                	//像资金系统发送支付单信息
                	$.ajax({
                		type: 'post',
                		dataType:'json',
                		data:{
                			payeeId:_payeeId,
                			capPayId:_capPayId 
                		},
                		url: '<%=path%>/capPay/flow/toSendPay.do',
                		success:function(msg){
                			wait_dialog.close();
                			 if(msg.success == 1){
               					 /* $.ligerDialog.SQalert({
            		                SQ_showButtons: true,
            		                SQ_onBtnclick: function (item, Dialog) {
            		                    //console.log(item, Dialog);
            		                },
            		                content: msg.info
            		         	 }); */
                				 UIUtils.alertSuccess(msg.info);
                				 window.location.reload();
                			 }else{
                				 //$.ligerDialog.SQalert({content: msg.info,SQ_type: "error"});
                				 UIUtils.alertError(msg.info);
                			 }
                		}
                	});
                } else {
                    $.ligerDialog.SQalert({content: msg.info, SQ_type: "error"});
                }
            }
        });
    	
    }
	//当前tab刷新
	function callback() {
        window.location.reload();
    }
    /**新增上牌信息*/
    function addSp(_prjPrdDtlId){
    	if(!_prjPrdDtlId)return;
    	var detailFlag = false;
    	//调上牌维护页面 传递是否流程标识(isFlow=1)  是的话 页面执行
		Add_navTab( 'sp_info_add','添加上牌信息','<%=path%>/project/prjprdlicinfo/toAddPage.do?isFlow=1&detailFlag='+detailFlag+'&dtlId='+_prjPrdDtlId,callback);
    }
    /**修改上牌信息*/
    function modifySp(_prjPrdDtlId){
    	if(!_prjPrdDtlId)return;
    	var detailFlag = false;
    	//调上牌维护页面 传递是否流程标识(isFlow=1)  是的话 页面执行
		Add_navTab( 'sp_info_add','修改上牌信息','<%=path%>/project/prjprdlicinfo/toAddPage.do?isFlow=1&detailFlag='+detailFlag+'&dtlId='+_prjPrdDtlId+'&id='+_prjPrdDtlId,callback);
    }
    /**查看上牌信息*/
    function showSp(_prjPrdDtlId){
    	var detailFlag = true;
    	//调上牌维护页面 传递是否流程标识(isFlow=1)  是的话 页面执行
    	Add_navTab( 'sp_info_add','查看上牌信息','<%=path%>/project/prjprdlicinfo/toAddPage.do?isFlow=1&checkSp=${checkSp}&detailFlag='+detailFlag+'&dtlId='+_prjPrdDtlId+'&id='+_prjPrdDtlId, callback);
    }
    /**新增抵押信息*/
    function addDy(_prjPrdDtlId){
    	if(!_prjPrdDtlId)return;
    	var detailFlag = false;
    	//调抵押维护页面 传递是否流程标识(isFlow=1)  是的话 页面执行
		Add_navTab( 'dy_info_add','添加抵押信息','<%=path%>/project/prjprdmtg/toAddPage.do?isFlow=1&detailFlag='+detailFlag+'&dtlId='+_prjPrdDtlId,callback);
    }
    /**修改抵押信息*/
    function modifyDy(_prjPrdDtlId){
    	if(!_prjPrdDtlId)return;
    	var detailFlag = false;
    	//调抵押维护页面 传递是否流程标识(isFlow=1)  是的话 页面执行
		Add_navTab( 'dy_info_add','修改抵押信息','<%=path%>/project/prjprdmtg/toAddPage.do?isFlow=1&detailFlag='+detailFlag+'&dtlId='+_prjPrdDtlId+'&id='+_prjPrdDtlId,callback);
    }
    /**查看抵押信息*/
    function showDy(_prjPrdDtlId){
    	var detailFlag = true;
    	//调抵押维护页面 传递是否流程标识(isFlow=1)  是的话 页面执行
    	Add_navTab( 'dy_info_add','查看抵押信息','<%=path%>/project/prjprdmtg/toAddPage.do?isFlow=1&checkDy=${checkDy}&detailFlag='+detailFlag+'&dtlId='+_prjPrdDtlId+'&id='+_prjPrdDtlId, callback);
    }
    //放款合同通过意见
    function contractOpnStart(){
    	var _opnTypCd = AuditConstant.AUD_PAY_OPN_TYP_CD_CONTRACT;
    	top.$.ligerDialog.open({
            width: 1000,
            height:400,
            title : '放款合同通过意见',
            url:'<%=path%>/audit/audPayPassOpinion/toModifyPage.do?capPayId='+_capPayId+'&proIntId='+_proIntId+'&opnTypCd='+_opnTypCd,
            buttons: [{
                    text: "保存", type: 'ok', cls: 'l-dialog-btn-ok',
                    onclick: function (item, Dialog) {
                        if (Dialog.onOk) Dialog.onOk();
                    }
                }, {
                    text: "预览", type: 'ok', cls: 'l-dialog-btn-ok',
                    onclick: function (item, Dialog) {
                        if (Dialog.preview) Dialog.preview();
                    }
                },{
                    text: "取消", type: 'cancel', cls: 'l-dialog-btn-no',
                    onclick: function (item, Dialog) {
                        if (Dialog.onCancel) Dialog.onCancel();
                    }
                }
            ]
        });
    }
    //放款抵押通过意见
    function mortGageOpnStart(){
    	var _opnTypCd = AuditConstant.AUD_PAY_OPN_TYP_CD_MORTGAGE;
    	top.$.ligerDialog.open({
            width: 1000,
            height:400,
            title : '放款抵押通过意见',
            url:'<%=path%>/audit/audPayPassOpinion/toModifyPage.do?capPayId='+_capPayId+'&proIntId='+_proIntId+'&opnTypCd='+_opnTypCd,
            buttons: [{
                    text: "保存", type: 'ok', cls: 'l-dialog-btn-ok',
                    onclick: function (item, Dialog) {
                        if (Dialog.onOk) Dialog.onOk();
                    }
                }, {
                    text: "预览", type: 'ok', cls: 'l-dialog-btn-ok',
                    onclick: function (item, Dialog) {
                        if (Dialog.preview) Dialog.preview();
                    }
                },{
                    text: "取消", type: 'cancel', cls: 'l-dialog-btn-no',
                    onclick: function (item, Dialog) {
                        if (Dialog.onCancel) Dialog.onCancel();
                    }
                }
            ]
        });
    }
    function rejOpnStart(){
    	var bookTypCd = AuditConstant.AUD_LOAN_BOOK_TYP_CD;//台账类型-放款驳回台账
    	var opinionTypeCd = AuditConstant.SYS_FLOW_REJ_RSN_TYP_CD_LOAN;//驳回意见类型-放款驳回
    	top.$.ligerDialog.open({
            width: 1000,
            height:400,
            title : '驳回意见',
            url:'<%=path%>/audit/audRejectOpinion/toAddPage.do?capPayId='+_capPayId+'&proIntId='+_proIntId+'&taskId='+_taskId+'&taskDefKey='+_taskDefKey+'&opinionTypeCd='+opinionTypeCd+'&bookTypCd='+bookTypCd+'&taskNm='+_taskNm,
            buttons: [{
                    text: "保存", type: 'ok', cls: 'l-dialog-btn-ok',
                    onclick: function (item, Dialog) {
                        if (Dialog.onOk) Dialog.onOk();
                    }
                }, {
                    text: "取消", type: 'cancel', cls: 'l-dialog-btn-no',
                    onclick: function (item, Dialog) {
                        if (Dialog.onCancel) Dialog.onCancel();
                    }
                }
            ]
        });
    }
    
    //客户详情
    function showCstDtl(_cstId){
        Add_navTab("InsPlcCstBscInfo_"+_cstId, "客户信息", '<%=path%>/customer/cstbscinfo/toCustDetailPage.do?id='+_cstId, null);
    }
    //项目详情
    function toPrjDetail(_projectId){
    	if(!_projectId)return;
    	Add_navTab("prjDetail"+_projectId, "项目信息", '<%=path%>/project/prjbscinfo/toModifyPage.do?detailFlag=true&id='+_projectId);
    }
    // 支付表详情
    function showPrjPrdPaySchDtl(){
    	var editFlag = true;
    	var prjId = '${capPayInfoVO.prjId}';
    	var id = '${capPayInfoVO.paySchId}';
    	var prjPrdDtlId = '${capPayInfoVO.prjPrdDtlId}';
    	var prjPrdId = '${capPayInfoVO.prjPrdId}';
    	Add_navTab('tab_prj_quat_prps'+id,'查看支付表','<%=path%>/project/prjprdpayschm/toAddPage.do?prjId='+prjId+'&&id='+id+'&&prjPrdDtlId='+prjPrdDtlId+'&&prjPrdId='+prjPrdId+'&&detailFlag='+editFlag);
    }
    
    //禁用页面所有
    function disabledAll(){
    	if(liger.get("isGrp")){
	    	liger.get("isGrp").setDisabled(true);
    	}
    	$("#isFstCol").attr("disabled","disabled");
    	if(liger.get("payeeTypCd")){
	    	liger.get("payeeTypCd").setDisabled(true);
    	}
    	if(liger.get("rcptUnt")){
	    	liger.get("rcptUnt").setDisabled(true);
    	}
    	if(liger.get("bkAccTypCd")){
	    	liger.get("bkAccTypCd").setDisabled(true);
    	}
    	if(liger.get("payeeBkNm")){
	    	liger.get("payeeBkNm").setDisabled(true);
    	}
    	if(liger.get("payeeBkNo")){
	    	liger.get("payeeBkNo").setDisabled(true);
    	}
    	if(liger.get("accNo")){
	    	liger.get("accNo").setDisabled(true);
    	}
    	$("#payRem").setDisabled_ligerTextarea(true);
    	/*if(liger.get("fundUse")){
	    	liger.get("fundUse").setDisabled(true);
    	}*/
    	if(liger.get("actPayAmt")){
	    	liger.get("actPayAmt").setDisabled(true);
    	}
    	if(liger.get("payWayCd")){
	    	liger.get("payWayCd").setDisabled(true);
    	}
    	if(liger.get("actPayTm")){
	    	liger.get("actPayTm").setDisabled(true);
    	}
    	if(liger.get("payAmt")){
	    	liger.get("payAmt").setDisabled(true);
    	}
    }
    //修改收款方信息-呈报人节点
    function enable1(){
    	console.log("enable1");
    	$("#isFstCol").removeAttr("disabled");
    	if(liger.get("payeeTypCd")){
	    	liger.get("payeeTypCd").setEnabled();
    	}
    	if(liger.get("rcptUnt")){
	    	liger.get("rcptUnt").setEnabled();
    	}
    	if(liger.get("bkAccTypCd")){
	    	liger.get("bkAccTypCd").setEnabled();
    	}
    	if(liger.get("payeeBkNm")){
	    	liger.get("payeeBkNm").setEnabled();
    	}
    	if(liger.get("payeeBkNo")){
	    	liger.get("payeeBkNo").setEnabled();
    	}
    	if(liger.get("accNo")){
	    	liger.get("accNo").setEnabled();
    	}
	    $("#payRem").setDisabled_ligerTextarea(false);
    }
    //设置起租日
    function addLeaseDate(){
        var _dueDate = $("#leaseDate").val();
        if(!_dueDate || _dueDate==" "){
            top.$.ligerDialog.SQalert({content: "起租日不能为空.", SQ_type: "warning"});
            return;
        }
        var wait_dialog;
        $.ajax({
            type: 'post',
            dataType:'json',
            data:{
                paySchId:'${capPayInfoVO.paySchId}',
                prjId:'${capPayInfoVO.prjId}',
                buOrgCd:'${capPayInfoVO.buOrgCd}',
                dueDate:_dueDate
            },
            url: '<%=path%>/capPay/flow/addLeaseDate.do',
            beforeSend: function(){
                wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
            },
            success:function(msg){
                wait_dialog.close();
                if(msg.success == 1){
                    top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "success"});
                }else{
                    top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
                }
            }
        });
    }
</script>
</body>
</html>
